package com.dff.easy_excel_demo.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * create by: L.gy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@HeadRowHeight(20)
@ContentRowHeight(15)
@ColumnWidth(15)
public class Student{

    @ExcelProperty(index = 0, value = "编号")
    private Integer id;

    @ExcelProperty(index = 1, value = "姓名")
    private String name;

    @ExcelProperty(index = 2, value = "性别")
    @ExcelIgnore
    private String gender;

    @ExcelProperty(index = 3, value = "所在班级")
    private String classNumber;

    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    @ExcelProperty(index = 4, value = "返校时间")
    private Date backSchoolTime;

   //@ExcelIgnore//忽略这个字段
   // private String ignore;

}
